<div id="content_body">
<div id="inscription_block">
<fly:block name="inscription">
	<div class="main-title">
		<fly:translate name="title_1" /><fly:modify name="title_1" />
	</div>
	<div id="wrap_details"><fly:translate name="text_1_3" /><fly:modify name="text_1_3" /></div>
	<form method="post" id="formulaire" name="formulaire" onSubmit="return $.submitFrm();">
			<div class="dotted"></div>
			<div id="txt_visibility"><fly:translate name='label_1_10'/><fly:modify name='label_1_10'/></div>
			<div class="dotted"></div>
			
			<fly:include name="contact" />
			
			<div id="field-line">
				<div id="line_1_field">
					<fly:translate name="label_1_11" /><fly:modify name="label_1_11" />
						<div class="obl" id="obl_line">
						<div id="wrap_titre">
							<fly:list name='titri'>
								<ul class="titre">
									<li>
			                   			<input type="radio"  class="oblig_titre"  name="id_titri" id="id_titri" value="<fly:variable name='id_titri' />" <fly:variable name='titri_checked' />/>&nbsp;<fly:variable name='name_titri' /><br />
			                		</li>
			                	</ul>
			                </fly:list>
			       		</div>
			       	</div>	       		
	                <span class="required_titre_check"></span> 
				</div>
	
				
				<div id="line_2_field">
					<fly:translate name='popup_1_12'/><fly:modify name='popup_1_12'/>
				</div>
				<div id="line_3_field">
					<span><img style="margin-top:5px;" src="/_design/disable_check.gif" alt="<fly:translate name='popup_1_11'/>" class="info_bull dich" /></span>
				</div>			
			</div>
			<div class="dotted"></div>

			<div id="field-line">
				<div id="line_1_field">
					<fly:translate name="label_1_2" /><fly:modify name="label_1_2" />
					<input tabindex='2' class="required" type="text" name="nom" id="nom" size="44" maxlength="255" value="<fly:variable name='nom'/>" />
				</div>
				<div id="line_2_field">
					<fly:translate name='popup_1_2'/><fly:modify name='popup_1_2'/>
				</div>
				<div id="line_3_field">
					<span style="float: left;"><input type="checkbox" alt="<fly:translate name='popup_1_10'/>" name="ch_name" class="info_bull" <fly:variable name='name_check'/> /></span>
					<fly:modify name='popup_1_10'/>
				</div>		
			</div>			
			<div class="dotted"></div>
			
			<div id="field-line">
				<div id="line_1_field">
					<fly:translate name="label_1_3" /><fly:modify name="label_1_3" />
					<input tabindex='3' class="required" type="text" name="prenom" id="prenom" size="44" maxlength="255" value="<fly:variable name='prenom'/>" />
				</div>
				<div id="line_2_field">
					<fly:translate name='popup_1_3'/><fly:modify name='popup_1_3'/>
				</div>
				<div id="line_3_field">
					<img src="/_design/disable_check.gif" alt="<fly:translate name='popup_1_11'/>" class="info_bull dich" /><fly:modify name="popup_1_11" />
				</div>		
			</div>			
			<div class="dotted"></div>
			
			<div id="field-line">
				<div id="line_1_field">
					<fly:translate name="label_1_5" /><fly:modify name="label_1_5" />
					<input tabindex='5' class="" type="text" name="city" id="city" size="44" maxlength="255" value="<fly:variable name='city'/>" />
				</div>
				<div id="line_2_field">
					<fly:translate name='popup_1_5'/><fly:modify name='popup_1_5'/>
				</div>
				<div id="line_3_field">
					<span style="float: left;"><input type="checkbox" alt="<fly:translate name='popup_1_10'/>" name="ch_city"  class="info_bull" <fly:variable name='city_check'/> /></span>
				</div>		
			</div>			
			<div class="dotted"></div>
			
			<div id="field-line">
				<div id="line_1_field">
					<fly:translate name="label_1_6" /><fly:modify name="label_1_6" />
						<select name="id_country" alt="<fly:translate name='popup_1_6'/>" class="">
	                   		<option value="0" disabled="disabled" selected="selected" ><fly:translate name="label_1_9" /></option>
	                   		<fly:list name='list_country'>
	                   			<option value="<fly:variable name='id_country' />" <fly:variable name='selection' /> ><fly:variable name='name_country' /></option>
	                   		</fly:list>
	                   </select>
	                   <fly:modify name="label_1_9" />
				</div>
				<div id="line_2_field">
					<fly:translate name='popup_1_6'/><fly:modify name='popup_1_6'/>
				</div>
				<div id="line_3_field">
					<span style="float: left;"><input type="checkbox" alt="<fly:translate name='popup_1_10'/>" name="ch_country"  class="info_bull" <fly:variable name='country_check'/> /></span>
				</div>		
			</div>			
			<div class="dotted"></div>
			
			<div id="field-line">
				<div id="line_1_field">
					<fly:translate name="label_1_8" /><fly:modify name="label_1_8" />
					<div class="obl">
						<div id="wrap_i_am">
							<fly:list name='i_am'>
			                   <input type="radio"   class="oblig_iam"  name="i_am" id="i_am<fly:variable name='id_i_am' />" value="<fly:variable name='id_i_am' />" <fly:variable name='checked' />/>&nbsp;<fly:variable name='name_i_am' /><br />
			                </fly:list>
			       		</div>
			       	</div>	       		
	                <span class="required_check"></span>	
				</div>
				<div id="line_2_field">
					<fly:translate name='popup_1_8'/><fly:modify name='popup_1_8'/>
				</div>
				<div id="line_3_field">
					<span><img src="/_design/disable_check.gif" alt="<fly:translate name='popup_1_11'/>" class="info_bull dich" /></span>
				</div>		
			</div>
	
			<div class="dotted"></div>
<!--star  -->
			<div class="bloc_agency-post">
				<div id="field-line">
					<div id="line_1_field">
						<fly:translate name="label_1_13" /><fly:modify name="label_1_13" />
						<input tabindex='3' class=" " type="text" name="agency" id="agency" size="44" maxlength="255" value="<fly:variable name='agency'/>" />
					</div>
					<div id="line_2_field">
						<fly:translate name='popup_1_13_1'/><fly:modify name='popup_1_13_1'/>
					</div>
					<div id="line_3_field">
						<img src="/_design/disable_check.gif" alt="<fly:translate name='popup_1_11'/>" class="info_bull dich" />
					</div>		
				</div>			
				<div class="dotted"></div>
				
				
				<div id="field-line">
					<div id="line_1_field">
						<fly:translate name="label_1_14" /><fly:modify name="label_1_14" />
						<input tabindex='3' class=" " type="text" name="website" id="website" size="44" maxlength="255" value="<fly:variable name='website'/>" />
					</div>
					<div id="line_2_field">
						<fly:translate name='popup_1_14_1'/><fly:modify name='popup_1_14_1'/>
					</div>
					<div id="line_3_field">
						<img src="/_design/disable_check.gif" alt="<fly:translate name='popup_1_11'/>" class="info_bull dich" />
					</div>		
				</div>			
				<div class="dotted"></div>
			</div><!--blac_agency  -->			
<!--end  -->		


			<div id="wrap_details_1"><fly:translate name="text_1_1" /><fly:modify name="text_1_1" /></div>	       	
	       	<div class="dotted"></div>
	       	
			<div id="field-line">
				<div id="line_1_field">					
					<input type="checkbox" class="check_inscription" name="check" id="check" <fly:variable name='check' />/>&nbsp;<fly:translate name="text_1_2" /><fly:modify name="text_1_2" />
					<br /><span class="error_check"></span>
				</div>
				<div id="line_2_field">
					<fly:translate name='popup_1_9'/><fly:modify name='popup_1_9'/>
				</div>
				<div id="line_3_field"></div>		
			</div>			
			<div class="dotted"></div>
       	
	    	<div id="form-ligne">
				<div id="form-field">
					<input type="submit" value="<fly:translate name="button_1_1" />" id="register" name="register" class="submit" />
					<input type="hidden" value="true" name="inscription" id="inscription" /><fly:modify name="button_1_1" />
					<input type="hidden" value="1" name="max_phone" id="max_phone" />
	       		</div>
				<div id="form-titre">&nbsp;</div>
	       	</div>
	       	
	       	
	  </form>
	<div id="foot"></div>
	<fly:modify name="error_message_1" />
</fly:block>
<fly:block name="success">
	<div class="main-title">
		<fly:translate name="title_2" /><fly:modify name="title_2" />
	</div>
	<fly:translate name="text_2_1" /><fly:modify name="text_2_1" />
	<a href="/"><fly:translate name="link_2_1" /></a>
</fly:block>
<span style="display:none" id="error_message_4"><fly:translate name="error_message_4" /></span><fly:modify name="error_message_4" />
<script type="text/javascript"><!--
var indexPhone = 1;
	$('document').ready(function() {
	
		//$("#i_am1").attr('checked', true);
	
		
		if($("#i_am1").attr('checked')!=true && $("#i_am2").attr('checked')!=true){
			$(".bloc_agency-post").css("display","none");
		}else{
			if($("#i_am1").attr('checked')){
				$(".bloc_agency-post").css("display","none");
			}
		
			if($("#i_am2").attr('checked')){
				$(".bloc_agency-post").css("display","block");
			}
		}
		
	
		$("#i_am1").click(function(){
			$(".bloc_agency-post").css("display","none");
		});
		$("#i_am2").click(function(){
			$(".bloc_agency-post").css("display","block");
		});
		
		$("#content_body  a.imgs").fancybox();
		$('body').append('<div id="tempo_recall_delete" style="display:none;"></div>');
		$("body").append('<div class="info_div"><div class="info_div_top"></div><div class="info_div_middle"><div class="info_div_text"></div></div><div class="info_div_bottom"></div></div>');
		$('form[name=formulaire]').validate({
		});
			/****** info bulles********/		
		$('.info_bull').mouseover(function(e){
			setInfoBulles(this);
			setInfoBullesPosition(this);
		}).mouseout(function(){
			$('.info_div').hide();			
		});	
		$("#tempo_recall_delete").html($.ajax({
							            url : '../_ajax/inscription/recall_delete_phone.php',
							            type: "POST",
							    		data: "id_carbon=1",
							    		async: false,
							    		timeout: 28000,
								        error: function(d,ms){			        	
								        	//$("#frm_reload").submit();
								        },
							    		success: function(mgs){
				                    	
				            			}
							        }).responseText);

	});
	
	$.submitFrm = function(){
		var no_error1 = 0;
		var no_error2 = 0;
		var allTrue=0;
		
		
		$(".check_phone_number").each(function(){ 
			var data = $(this).val();          
              if(data.trim() == '') {   // alert('fff');          
                  $(this)
                      .addClass('error1')
                      .focus(function() { $(this).removeClass('error1'); });   
                  no_error2++;                  
              }	
		});
		$("fieldset.border_phone").each(function(){
			var allTrueIn=0;
			//alert(allTrueIn+"=="+allTrue+"<==1");
			var i = ($(this).attr('id')).match(/[0-9]+/);
			$("."+i+"-need_check_phone_language").each(function(){
				if($(this).is(':checked')){
					return allTrueIn++;					
				}
				$(this).click(function(){ $("."+i+"-need_check_phone_language").parent().parent().removeClass('wap_need_check_error'); });
				//alert(allTrueIn+"=="+allTrue+"<==process==>"+$(this).attr('name'));	
			});
			//alert(allTrueIn+"=="+allTrue+"<==2");
			if(allTrueIn>0) allTrue++;
			allTrueIn=0;			 
		});
		allTrue>=indexPhone?no_error1++:'';
		
		if( no_error1 > 0 && no_error2 == 0){
			$("#max_phone").val(indexPhone);
			return true;		 
		}
		else{
		var al=0;
				
				if(allTrue < indexPhone){
					$("fieldset.border_phone").each(function(){
					var i = ($(this).attr('id')).match(/[0-9]+/);
					var testCheck=0;
						$("."+i+"-need_check_phone_language").each(function(){
							if($(this).is(':checked')){ //alert(testCheck+"=="+i);
								testCheck++;
							}						                 
						});
						//alert(testCheck+"=="+i);
						if(testCheck==0) $("fieldset#fi"+i+" .wrap_chph").addClass('wap_need_check_error');
					});
					al=1;
				}
			
				if(al==1) alert($("#error_message_4").html());
			return false;
		}	
	};	
	function setInfoBulles(obj){
		//var offset = $(obj).offset();//,'left':offset.left
		//$('.info_div').css({'top':offset.top-171});
		
		if($(obj).attr('alt')!="undefined"){			
			$('.info_div_text').text($(obj).attr('alt'));
		}else{
			$('.info_div_text').text($(obj).attr('title'));
		}
		$('.info_div').css("display","block");
	}
	function setInfoBullesPosition(obj){
		var width = $(obj).width();
		var offset = $(obj).offset();//,'left':offset.left
		//w = 655-(parseInt(width)+150)+14;
		w = offset.left+parseInt(width)+15;
		
		$('.info_div').css({'left':w+'px'});
		var type = $(obj).attr("type");
		
		if(type == 'textarea'){$('.info_div').css({'top':offset.top+30});}
		else if(type == 'select-one'){$('.info_div').css({'top':offset.top-10});}
		else $('.info_div').css({'top':offset.top-15});
	}
--></script>
</div>
</div>